function logValue(x:Date | string){
  if (x instanceof Date) {
    console.log(x.toUTCString());
  }else{
    console.log(x.toLocaleUpperCase());
    
  }
}
logValue(new Date())
logValue('hello ts')